import { createPinia, setMapStoreSuffix, setActivePinia } from 'pinia'
import messageStore from './modules/message'
import modalStore from './modules/modal'
export const useMessageStore = messageStore
export const useModalStore = modalStore
//https://pinia.vuejs.org/zh/cookbook/options-api.html

// 参考：
// export const useCountStore = defineStore('count', {
//     state: () => ({ count: 0 }),
//     getters: {
//         doubleCount: (state) => state.count,
//     },
//     actions: {
//         increment() {
//             this.count++
//         },
//     },
// })


setMapStoreSuffix('_store')
const pinia = createPinia()
setActivePinia(pinia);
export default pinia